#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
int main()
{
    FILE*fp=fopen("log.txt","w");
    if(fp==NULL)
    {
        perror("fopen");
        exit(1);
    }
    fputs("abcdefg",fp);
    fseek(fp,2,SEEK_SET);
    fputs("aa",fp);
    fclose(fp);
    return 0;
}
